package com.manager.car.service;

import java.util.List;

import com.manager.car.dao.IMessageDao;
import com.manager.car.po.MessageInfo;


public class MessageServiceImpl implements IMessageService {

	private IMessageDao mdao;
	//添加留言
	public void addMeg(MessageInfo meg) {
		this.mdao.save(meg);
		
	}
    //修改留言
	public void updateMeg(MessageInfo meg) {
		this.mdao.update(meg);
		
	}
	//删除留言
	public void deleteMeg(Integer id) {
		this.mdao.delete(id);
		
	}
    //查询留言
	public MessageInfo queryByMegId(Integer id) {
		
		return this.mdao.queryById(id);
	}
    //分页查询
	public List<MessageInfo> queryAll(String name, int limit, int page) {
		
		return mdao.queryAll(name, limit, page);
	}

	public int getcount(String name, int limit, int page) {
		
		return mdao.getcount(name, limit, page) ;
	}
	public IMessageDao getMdao() {
		return mdao;
	}
	public void setMdao(IMessageDao mdao) {
		this.mdao = mdao;
	}
    
}
